package com.hbt.orderfood.activity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.hbt.orderfood.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class ButtonActivity extends AppCompatActivity {

    @BindView(R.id.main)
    Button main;
    @BindView(R.id.manager)
    Button manager;
    @BindView(R.id.myorder)
    Button myorder;
    @BindView(R.id.register)
    Button register;
    @BindView(R.id.login)
    Button login;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_button);
        ButterKnife.bind(this);
//        User user = new User();
//        User user1 = new User();
//        user.setUsername("111");
//        user.setPassword("111");
//        user1.setUsername("222");
//        user1.setPassword("222");
//        new DBAdapter(this).insertUser(user);
//        new DBAdapter(this).insertUser(user1);
    }

    @OnClick(R.id.main)
    void jumpToMain() {
        Intent intent = new Intent(ButtonActivity.this, MainActivity.class);
        startActivity(intent);
    }

    @OnClick(R.id.manager)
    public void onViewClicked() {
        Intent intent = new Intent(ButtonActivity.this, ManagerActivity.class);
        startActivity(intent);
    }

    @OnClick(R.id.myorder)
    public void clickmyorder() {
        Intent intent = new Intent(ButtonActivity.this, MyOrderActivity.class);
        startActivity(intent);
    }

    @OnClick(R.id.register)
    public void clickregister() {
        Intent intent = new Intent(ButtonActivity.this, RegisterActivity.class);
        startActivity(intent);
    }

    @OnClick(R.id.login)
    public void clickLogin() {
        Intent intent = new Intent(ButtonActivity.this, LoginActivity.class);
        startActivity(intent);
    }
}
